<form class="layui-form" action="#" method="post">
    {empty name="template_params"}
        <div style="padding: 30px;" class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    {volist name="template" id="vo"}
                        <li {if condition='$key eq "order" '}class="layui-this"{/if} >{$vo.title}</li>
                    {/volist}
                </ul>
                <div class="layui-tab-content">
                    {volist name="template" id="vo" }
                        {assign name="template_key" value="$key" /}
                        <div {if condition='$template_key eq "order"'}class="layui-tab-item layui-show"{else/}class="layui-tab-item layui-show"{/if}>
                        {volist name="vo.data" id="d"}
                            <div class="layui-form-item">
                                <label class="layui-form-label">{$d.title}：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="setting[{$template_key}][{$d.code}]" required lay-verify="required" placeholder="请输入{$d.title}，例如：{{character_string1.DATA}}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        {/volist}
                        </div>
                    {/volist}
                </div>
            </div>
        </div>
    {/empty}
    {notempty name="$template_params"}
        <div style="padding: 30px;" class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    {volist name="template" id="vo"}
                        <li {if condition='$key eq "order"'}class="layui-this"{/if}>{$vo.title}</li>
                    {/volist}
                </ul>
                <div class="layui-tab-content">
                    {volist name="template" id="vo" }
                        {assign name="template_key" value="$key" /}
                        <div {if condition='$template_key eq "order"'}class="layui-tab-item layui-show"{else/} class="layui-tab-item"{/if}>
                        {volist name="vo.data" id="d"}
                        <div class="layui-form-item">
                            <label class="layui-form-label">{$d.title}：</label>
                            <div class="layui-input-block">
                                <input type="text" name="setting[{$template_key}][{$d.code}]" required lay-verify="required" value="{$template_params[$template_key][$d.code]}" placeholder="请输入{$d.title}，例如：{{character_string1.DATA}}" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        {/volist}
                        </div>
                    {/volist}
                </div>
            </div>
        </div>
    {/notempty}
    <script>
        layui.use('element', function () {
            //监听提交
            var $ = layui.jquery
                , element = layui.element;
        });
    </script>
</form>